package org.ekingstar.qd.domain;

import com.ekingstar.framework.domain.Role;

/**
 * AbstractQdFunctionRoleId entity provides the base persistence definition of
 * the QdFunctionRoleId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public abstract class AbstractQdFunctionRoleId implements java.io.Serializable {

	// Fields

	private QdFunction functionId;
	private Role roleId;

	// Constructors

	/** default constructor */
	public AbstractQdFunctionRoleId() {
	}

	/** full constructor */
	public AbstractQdFunctionRoleId(QdFunction functionId, Role roleId) {
		this.functionId = functionId;
		this.roleId = roleId;
	}

	// Property accessors

	public QdFunction getFunctionId() {
		return this.functionId;
	}

	public void setFunctionId(QdFunction functionId) {
		this.functionId = functionId;
	}

	public Role getRoleId() {
		return this.roleId;
	}

	public void setRoleId(Role roleId) {
		this.roleId = roleId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof AbstractQdFunctionRoleId))
			return false;
		AbstractQdFunctionRoleId castOther = (AbstractQdFunctionRoleId) other;

		return ((this.getFunctionId() == castOther.getFunctionId()) || (this
				.getFunctionId() != null
				&& castOther.getFunctionId() != null && this.getFunctionId()
				.equals(castOther.getFunctionId())))
				&& ((this.getRoleId() == castOther.getRoleId()) || (this
						.getRoleId() != null
						&& castOther.getRoleId() != null && this.getRoleId()
						.equals(castOther.getRoleId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getFunctionId() == null ? 0 : this.getFunctionId()
						.hashCode());
		result = 37 * result
				+ (getRoleId() == null ? 0 : this.getRoleId().hashCode());
		return result;
	}

}